export interface PPTListItem {
  id: number,
  ppt_name?: string,
  ppt_image?: string,
  created_at?: string,
  deleted_at?: number,
  content?: string,
}

interface PPTDataItem {
  type: 'home' | 'contents' | 'title' | 'page' | 'end' | 'page_sub_title',
}

export interface PPTHomeEndPage extends PPTDataItem {
  type: 'home' | 'end',
  title: string,
  sub_title: string
}

export interface PPTContents extends PPTDataItem {
  type: 'contents',
  list: string[]
}

export interface PPTTitle extends PPTDataItem {
  type: 'title',
  title_title: string,
  title_sub_title?: string,
  pages?: PPTPage[],
  title_number?: string
}

export interface PPTPageList extends PPTDataItem {
  type: 'page_sub_title',
  page_sub_title: string,
  page_content?: string,
}

export interface PPTPage extends PPTDataItem{
  type: 'page',
  page_title: string,
  list: PPTPageList[]
}



export type PPTDataJson = PPTHomeEndPage | PPTTitle

export type ServerData = PPTHomeEndPage | PPTContents | PPTTitle | PPTPage

export interface TypeQuery {
  page: number,
  limit: number,
  type: 0 | 1
}

export interface PptListResponse {
  list: PPTListItem[],
  total: number
}

export type ListResponse = null | PptListResponse

export interface CreatePptResponse {

}

export interface StreamResponse {
  reader: ReadableStreamDefaultReader,
  header: Headers,
  control: AbortController
}

export interface UploadFileItem {
  name: string,
  file_id: string
}